package com.dong.containerEx.beanPostProcessor;

import com.dong.containerEx.User;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * description
 *
 * @author Administrator 2021/08/30 18:52
 */
public class ContainerTest {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("classpath:/bean.xml");

        final ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
        beanFactory.addBeanPostProcessor(context.getBean(MyBeanPostProcessor1.class));
        User user = context.getBean(User.class);
        System.out.println(user);
    }

}
